<h1>Agenda events List</h1>

<?php foreach ($parent_categories as $parent_category): ?>
  <?php $categories = $parent_category->getSubCategories(sfConfig::get('app_max_categories_per_parent_on_homepage')) ?>
  <?php foreach ($categories as $category): ?>
    <?php echo $category->getParentCategory() . ' > ' . link_to($category->getName(), 'category', $category) ?>
        <?php include_partial('event/list', array('events' => $category->getActiveEvents(sfConfig::get('app_max_events_per_category_on_homepage')))) ?>
  <?php endforeach; ?>
<?php endforeach; ?>
